<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    let r=parseInt(prompt("请输入圆的半径"));
    function f(r) {
         return r*r*Math.PI;
    }
    let S=f(r);
    document.write(S)
</script>
</body>
</html>